GdkSeat * gdk_surface_get_seat_from_event (GdkSurface *surface,
GdkEvent *event);
+void gdk_surface_enter_monitor (GdkSurface *surface,
+ GdkMonitor *monitor);
+void gdk_surface_leave_monitor (GdkSurface *surface,
+ GdkMonitor *monitor);
+
/*****************************************
* Interfaces provided by windowing code *
*****************************************/
GdkGLContext *gdk_surface_get_shared_data_gl_context (GdkSurface *surface);
+
/*
* GdkSeatGrabPrepareFunc:
* @seat: the #GdkSeat being grabbed
SIZE_CHANGED,
RENDER,
EVENT,
+ ENTER_MONITOR,
+ LEAVE_MONITOR,
LAST_SIGNAL
};
g_signal_set_va_marshaller (signals[EVENT],
G_OBJECT_CLASS_TYPE (object_class),
_gdk_marshal_BOOLEAN__BOXEDv);
+
+ /**
+ * GdkSurface::enter-montor:
+ * @surface: the #GdkSurface
+ * @monitor: the monitor
+ *
+ * Emitted when @surface starts being present on the monitor.
+ */
+ signals[ENTER_MONITOR] =
+ g_signal_new (g_intern_static_string ("enter-monitor"),
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ 0,
+ NULL,
+ NULL,
+ NULL,
+ G_TYPE_NONE,
+ 1,
+ GDK_TYPE_MONITOR);
+
+ /**
+ * GdkSurface::leave-montor:
+ * @surface: the #GdkSurface
+ * @monitor: the monitor
+ *
+ * Emitted when @surface stops being present on the monitor.
+ */
+ signals[LEAVE_MONITOR] =
+ g_signal_new (g_intern_static_string ("leave-monitor"),
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ 0,
+ NULL,
+ NULL,
+ NULL,
+ G_TYPE_NONE,
+ 1,
+ GDK_TYPE_MONITOR);
}
static void
}
return gdk_display_get_default_seat (surface->display);
}
+
+void
+gdk_surface_enter_monitor (GdkSurface *surface,
+ GdkMonitor *monitor)
+{
+ g_signal_emit (surface, signals[ENTER_MONITOR], 0, monitor);
+}
+
+void
+gdk_surface_leave_monitor (GdkSurface *surface,
+ GdkMonitor *monitor)
+{
+ g_signal_emit (surface, signals[LEAVE_MONITOR], 0, monitor);
+}